//package com.zhuangjie.idworker.api;
//
//import com.zhaungjie.base.conduit.R;
//import com.zhuangjie.idworker.api.service.SnowflakeService;
//import com.zhuangjie.security.annotations.PublicAPI;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import javax.servlet.http.HttpServletRequest;
//
//@RestController
//@RequestMapping("/snowflake")
//public class SnowflakeController {
//
//    @Autowired
//    private SnowflakeService snowflakeService;
//    @GetMapping("/nextId")
//    @PublicAPI
//    public R nextId(HttpServletRequest request) {
//        // 判断请求是否来自内部局域网
//        Long snowflakeId =  snowflakeService.nextId(request);
//        return R.ok().data(snowflakeId);
//    }
//
//
//}
